package com.yibo.manager.user.controller;

import com.yibo.db.helper.QueryFilter;
import com.yibo.manager.user.ManagerUserService;
import com.yibo.support.helper.ResultHelper;
import com.yibo.support.pojo.IResult;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import static com.yibo.support.constant.ApiUrlConstant.PRIVATE_URL;

@RestController
@RequestMapping(PRIVATE_URL+"/managerUser")
public class ManagerUserController {

    @Resource
    private ManagerUserService managerUserService;

    @PostMapping("/query")
    public IResult<QueryFilter>  query(@RequestBody QueryFilter filter){
        return ResultHelper.result("查询成功",managerUserService.queryList(filter));
    }

    @GetMapping("/loginOut")
    public IResult<Integer>  loginOut(){
        return ResultHelper.result("退出成功",managerUserService.loginOut());
    }
}
